// pages/customer/customer.js
var app = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    show1: true,
    show2: true,
    data: ''
  },

  onShow: function() {
    this.lackStockManage();
  },
  lackStockManage: function() {
    let that = this;
    app.post('/shop/lackStockManage').then(res => {
      that.setData({
        data: res,
        show1: res.lackGoodsNum == 0 ? true : false,
        show2: res.unSentRestockNum == 0 ? true : false,
      })
    });
  },
  kucun: function() {
    wx.navigateTo({
      url: './stock-info/stock-info',
    })
  },
  bh: function() {
    wx.navigateTo({
      url: './stock-replenish/stock-replenish',
    })
  }
})